package com.qzd.prototype;

/**
 * 普通原型模式
 */
public class ConcretePrototy implements IPrototype {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public ConcretePrototy clone() {
        ConcretePrototy concretePrototy=new ConcretePrototy();
        concretePrototy.setName(this.name);
        concretePrototy.setAge(this.age);
        return  concretePrototy;
    }
}
